<template>
  <div>
    <div class="addBody">
      <div class="top">
        <el-form :inline="true" class="addMessage" ref="form" :model="editRemind" label-width="125px">
          <span style="position: absolute; margin: 15px 0px 0px 70px; color: red;">*</span>
          <el-form-item label="机构:">
            <el-input v-model="editRemind.data.fittings_type_label" class="smallMessage readonlyOne" readonly></el-input>
          </el-form-item>
          <el-form-item label-width="100px" label="状态:">
            <el-select v-model="editRemind.data.status" class="smallMessage readonlyOne" clearable filterable placeholder="请选择">
              <el-option
                v-for="item in status"
                :key="item.value"
                :label="item.label"
                :value="item.value">
              </el-option>
            </el-select>
          </el-form-item>
          <span style="position: absolute; margin: 15px 0px 0px 42px; color: red;">*</span>
          <el-form-item label="配件编码:">
            <el-input v-model="editRemind.data.fittings_id" class="smallMessage readonlyOne" readonly></el-input>
          </el-form-item>
          <span style="position: absolute; margin: 15px 0px 0px 17px; color: red;">*</span>
          <el-form-item label-width="100px" label="配件名称:">
            <el-input v-model="editRemind.data.name" class="smallMessage readonlyOne" readonly></el-input>
          </el-form-item>
        </el-form>
      </div>
      <div class="time">
        <el-form :inline="true" class="addMessageTwo" ref="form" :model="editRemind" label-width="125px">
          <span style="position: absolute; margin: 15px 0px 0px 5px; color: red;">*</span>
          <el-form-item class="onlyLine" label="使用寿命(时间):">
            <el-input v-model="editRemind.data.time_service_life" class="theSmallMessage"></el-input>
            <el-select v-model="editRemind.data.time_type" class="moreSmallMessage" filterable placeholder="请选择">
              <el-option
                v-for="item in life"
                :key="item.value"
                :label="item.label"
                :value="item.value">
              </el-option>
            </el-select>
          </el-form-item>
          <span style="position: absolute; margin: 15px 0px 0px 13px; color: red;">*</span>
          <el-form-item label="阈值系数1(%):">
            <el-input v-model="editRemind.data.time_thresholds_one" class="smallMessage"></el-input>
          </el-form-item>
          <el-form-item label-width="100px" label="发送消息:">
            <el-radio-group v-model="time_thresholds_one_num">
              <el-radio label="每天1次"></el-radio><el-input v-model="editRemind.data.time_thresholds_one_send1" class="mostSmallMessage"></el-input>
              <el-radio label="每天2次"></el-radio><el-input v-model="editRemind.data.time_thresholds_one_send1" class="mostSmallMessage"></el-input><el-input v-model="editRemind.data.time_thresholds_one_send2" class="mostSmallMessage"></el-input>
            </el-radio-group>
          </el-form-item>
          <el-form-item label="阈值系数2(%):">
            <el-input v-model="editRemind.data.time_thresholds_two" class="smallMessage"></el-input>
          </el-form-item>
          <el-form-item label-width="100px" label="发送消息:">
            <el-radio-group v-model="time_thresholds_two_num">
              <el-radio label="每天1次"></el-radio><el-input v-model="editRemind.data.time_thresholds_two_send1" class="mostSmallMessage"></el-input>
              <el-radio label="每天2次"></el-radio><el-input v-model="editRemind.data.time_thresholds_two_send1" class="mostSmallMessage"></el-input><el-input v-model="editRemind.data.time_thresholds_two_send2" class="mostSmallMessage"></el-input>
            </el-radio-group>
          </el-form-item>
          <el-form-item label="阈值系数3(%):">
            <el-input v-model="editRemind.data.time_thresholds_three" class="smallMessage"></el-input>
          </el-form-item>
          <el-form-item label-width="100px" label="发送消息:">
            <el-radio-group v-model="time_thresholds_three_num">
              <el-radio label="每天1次"></el-radio><el-input v-model="editRemind.data.time_thresholds_three_send1" class="mostSmallMessage"></el-input>
              <el-radio label="每天2次"></el-radio><el-input v-model="editRemind.data.time_thresholds_three_send1" class="mostSmallMessage"></el-input><el-input v-model="editRemind.data.time_thresholds_three_send2" class="mostSmallMessage"></el-input>
            </el-radio-group>
          </el-form-item>
        </el-form>
      </div>
      <div class="time">
        <el-form :inline="true" class="addMessageTwo" ref="form" :model="editRemind" label-width="125px">
          <span style="position: absolute; margin: 15px 0px 0px 5px; color: red;">*</span>
          <el-form-item class="onlyLine" label="使用寿命(次数):">
            <el-input v-model="editRemind.data.num_service_life" class="theSmallMessage"></el-input>
            <el-select class="moreSmallMessage" v-model="deadNumber" filterable placeholder="请选择">
              <el-option
                v-for="item in frequency"
                :key="item.value"
                :label="item.label"
                :value="item.value">
              </el-option>
            </el-select>
          </el-form-item>
          <span style="position: absolute; margin: 15px 0px 0px 13px; color: red;">*</span>
          <el-form-item label="阈值系数1(%):">
            <el-input v-model="editRemind.data.num_thresholds_one" class="smallMessage"></el-input>
          </el-form-item>
          <el-form-item label-width="100px" label="发送消息:">
            <el-radio-group v-model="num_thresholds_one_num">
              <el-radio label="每天1次"></el-radio><el-input v-model="editRemind.data.num_thresholds_one_send1" class="mostSmallMessage"></el-input>
              <el-radio label="每天2次"></el-radio><el-input v-model="editRemind.data.num_thresholds_one_send1" class="mostSmallMessage"></el-input><el-input v-model="editRemind.data.num_thresholds_one_send2" class="mostSmallMessage"></el-input>
            </el-radio-group>
          </el-form-item>
          <el-form-item label="阈值系数2(%):">
            <el-input v-model="editRemind.data.num_thresholds_two" class="smallMessage"></el-input>
          </el-form-item>
          <el-form-item label-width="100px" label="发送消息:">
            <el-radio-group v-model="num_thresholds_two_num">
              <el-radio label="每天1次"></el-radio><el-input v-model="editRemind.data.num_thresholds_two_send1" class="mostSmallMessage"></el-input>
              <el-radio label="每天2次"></el-radio><el-input v-model="editRemind.data.num_thresholds_two_send1" class="mostSmallMessage"></el-input><el-input v-model="editRemind.data.num_thresholds_two_send2" class="mostSmallMessage"></el-input>
            </el-radio-group>
          </el-form-item>
          <el-form-item label="阈值系数3(%):">
            <el-input v-model="editRemind.data.num_thresholds_three" class="smallMessage"></el-input>
          </el-form-item>
          <el-form-item label-width="100px" label="发送消息:">
            <el-radio-group v-model="num_thresholds_three_num">
              <el-radio label="每天1次"></el-radio><el-input v-model="editRemind.data.num_thresholds_three_send1" class="mostSmallMessage"></el-input>
              <el-radio label="每天2次"></el-radio><el-input v-model="editRemind.data.num_thresholds_three_send1" class="mostSmallMessage"></el-input><el-input v-model="editRemind.data.num_thresholds_three_send2" class="mostSmallMessage"></el-input>
            </el-radio-group>
          </el-form-item>
          <span style="position: absolute; margin: 15px 0px 0px 13px; color: red;">*</span>
          <el-form-item label="到期提醒内容:">
            <el-input v-model="editRemind.data.num_remind_content" class="bigMessage"></el-input>
          </el-form-item>
        </el-form>
      </div>
      <div class="time">
        <el-form :inline="true" class="addMessageTwo" ref="form" :model="editRemind" label-width="125px">
          <span style="position: absolute; margin: 15px 0px 0px 14px; color: red;">*</span>
          <el-form-item class="onlyLine" label="周期检查提醒:">
            <el-input v-model="editRemind.data.cycle_service_life" class="theSmallestMessage"></el-input><span style="color: #000;">次/</span>
            <el-select v-model="editRemind.data.cycle_type" class="moreSmallMessage" filterable placeholder="请选择">
              <el-option
                v-for="item in cycle"
                :key="item.value"
                :label="item.label"
                :value="item.value">
              </el-option>
            </el-select>
          </el-form-item>
          <span style="position: absolute; margin: 15px 0px 0px 13px; color: red;">*</span>
          <el-form-item label="阈值系数1(%):">
            <el-input v-model="editRemind.data.cycle_thresholds_one" class="smallMessage"></el-input>
          </el-form-item>
          <el-form-item label-width="100px" label="发送消息:">
            <el-radio-group v-model="cycle_thresholds_one_num">
              <el-radio label="每天1次"></el-radio><el-input v-model="editRemind.data.cycle_thresholds_one_send1" class="mostSmallMessage"></el-input>
              <el-radio label="每天2次"></el-radio><el-input v-model="editRemind.data.cycle_thresholds_one_send1" class="mostSmallMessage"></el-input><el-input v-model="editRemind.data.cycle_thresholds_one_send2" class="mostSmallMessage"></el-input>
            </el-radio-group>
          </el-form-item>
          <el-form-item label="阈值系数2(%):">
            <el-input v-model="editRemind.data.cycle_thresholds_two" class="smallMessage"></el-input>
          </el-form-item>
          <el-form-item label-width="100px" label="发送消息:">
            <el-radio-group v-model="cycle_thresholds_two_num">
              <el-radio label="每天1次"></el-radio><el-input v-model="editRemind.data.cycle_thresholds_two_send1" class="mostSmallMessage"></el-input>
              <el-radio label="每天2次"></el-radio><el-input v-model="editRemind.data.cycle_thresholds_two_send1" class="mostSmallMessage"></el-input><el-input v-model="editRemind.data.cycle_thresholds_two_send2" class="mostSmallMessage"></el-input>
            </el-radio-group>
          </el-form-item>
          <el-form-item label="阈值系数3(%):">
            <el-input v-model="editRemind.data.cycle_thresholds_three" class="smallMessage"></el-input>
          </el-form-item>
          <el-form-item label-width="100px" label="发送消息:">
            <el-radio-group v-model="cycle_thresholds_three_num">
              <el-radio label="每天1次"></el-radio><el-input v-model="editRemind.data.cycle_thresholds_three_send1" class="mostSmallMessage"></el-input>
              <el-radio label="每天2次"></el-radio><el-input v-model="editRemind.data.cycle_thresholds_three_send1" class="mostSmallMessage"></el-input><el-input v-model="editRemind.data.cycle_thresholds_three_send2" class="mostSmallMessage"></el-input>
            </el-radio-group>
          </el-form-item>
          <span style="position: absolute; margin: 15px 0px 0px 13px; color: red;">*</span>
          <el-form-item label="周期提醒内容:">
            <el-input v-model="editRemind.data.cycle_remind_content" class="bigMessage"></el-input>
          </el-form-item>
        </el-form>
      </div>
    </div>
    <el-button type="primary" class="clear"><router-link :to="{path:'/monitor/components/strateygs'}">取消</router-link></el-button>
    <el-button class="indieWidth" type="primary" @click="editReplaceWork()">保存</el-button>
  </div>
</template>

<script>
  import axios from 'axios'
  export default {
    components: {
    },
    data() {
      return {
        mechanism: [],
        life: [],
        cycle: [],
        oidSelect: [{
          oid: '请先选择机构',
          name: '请先选择机构'
        }],
        status: [{
          label: '禁用',
          value: 0
        }, {
          label: '启用',
          value: 1
        }],
        frequency: [{
          label: '次',
          value: '0'
        }],
        deadNumber: '0',
        time_thresholds_one_num: '',
        time_thresholds_two_num: '',
        time_thresholds_three_num: '',
        num_thresholds_one_num: '',
        num_thresholds_two_num: '',
        num_thresholds_three_num: '',
        cycle_thresholds_one_num: '',
        cycle_thresholds_two_num: '',
        cycle_thresholds_three_num: '',
        // 提醒策略总览请求内容
        remindOnceBody: {
          access_token: localStorage.getItem('access_token'),
          type: 'strategy_get_condition',
          data: {
            condition: {
              fittings_id: this.$route.query.fittingsId,
              fittings_ids: [],
              name: '',
              fittings_type: '',
              fittings_types: [],
              status: ''
            },
            page: {
              page_size: '10',
              page_number: '1'
            }
          }
        },
        getOidBody: {
          access_token: localStorage.getItem('access_token'),
          type: 'oid_get_condition',
          data: {
            condition: {
              oid: '',
              oids: [],
              oid_filter: [],
              name: '',
              search: '',
              etl: '',
              fittings: '',
              fittings_type: '',
              type: '',
              types: []
            },
            page: {
              page_size: '100',
              page_number: '1'
            }
          }
        },
        getAllNeed: {
          access_token: localStorage.getItem('access_token'),
          type: 'fittings_get_basicdata'
        },
        getOidBody: {
          access_token: localStorage.getItem('access_token'),
          type: 'oid_get_condition',
          data: {
            condition: {
              oid: '',
              oids: [],
              oid_filter: [],
              name: '',
              search: '',
              etl: '',
              fittings: '',
              fittings_type: '',
              type: '',
              types: []
            },
            page: {
              page_size: '100',
              page_number: '1'
            }
          }
        },
        editRemind: {
          access_token: localStorage.getItem('access_token'),
          type: 'strategy_mod',
          data: {
            fittings_id: '',
            name: '',
            remarks: '',
            fittings_type: '',
            status: '',
            time_service_life: '',
            time_type: '',
            time_remind_content: '',
            time_thresholds_one: '',
            time_thresholds_one_num: '',
            time_thresholds_one_send1: '',
            time_thresholds_one_send2: '',
            time_thresholds_two: '',
            time_thresholds_two_num: '',
            time_thresholds_two_send1: '',
            time_thresholds_two_send2: '',
            time_thresholds_three: '',
            time_thresholds_three_num: '',
            time_thresholds_three_send1: '',
            time_thresholds_three_send2: '',
            num_service_life: '',
            num_remind_content: '',
            num_thresholds_one: '',
            num_thresholds_one_num: '',
            num_thresholds_one_send1: '',
            num_thresholds_one_send2: '',
            num_thresholds_two: '',
            num_thresholds_two_num: '',
            num_thresholds_two_send1: '',
            num_thresholds_two_send2: '',
            num_thresholds_three: '',
            num_thresholds_three_num: '',
            num_thresholds_three_send1: '',
            num_thresholds_three_send2: '',
            cycle_service_life: '',
            cycle_type: '',
            cycle_remind_content: '',
            cycle_thresholds_one: '',
            cycle_thresholds_one_num: '',
            cycle_thresholds_one_send1: '',
            cycle_thresholds_one_send2: '',
            cycle_thresholds_two: '',
            cycle_thresholds_two_num: '',
            cycle_thresholds_two_send1: '',
            cycle_thresholds_two_send2: '',
            cycle_thresholds_three: '',
            cycle_thresholds_three_num: '',
            cycle_thresholds_three_send1: '',
            cycle_thresholds_three_send2: ''
          }
        }
      }
    },
    created() {
      this.getOnceReplace()
    },
    methods: {
      getFittingType() {
        this.getOidBody.data.condition.fittings_type = this.editRemind.data.fittings_type
        this.getOid()
      },
      getOid() {
        axios.post('/basicdata', this.getOidBody, {
          headers: {
            'Content-Type': 'application/x-www-form-urlencoded'
          }
        }).then((res) => {
          this.oidSelect = res.data.data.items
        })
          .catch((error) => {
            console.log(error)
          })
      },
      getOidName() {
        for (let a = 0; a < this.oidSelect.length; a++) {
          if (this.oidSelect[a].oid === this.editRemind.data.fittings_id) {
            this.editRemind.data.name = this.oidSelect[a].name
          }
        }
      },
      getOidNumber() {
        for (let a = 0; a < this.oidSelect.length; a++) {
          if (this.oidSelect[a].name === this.editRemind.data.name) {
            this.editRemind.data.fittings_id = this.oidSelect[a].oid
          }
        }
      },
      clearOid() {
        this.editRemind.data.name = ''
      },
      clearName() {
        this.editRemind.data.fittings_id = ''
      },
      getOnceReplace() {
        axios.post('/fittings', this.getAllNeed, {
          headers: {
            'Content-Type': 'application/x-www-form-urlencoded'
          }
        }).then((res) => {
          this.mechanism = res.data.fittings_type
          this.life = res.data.time_type
          this.cycle = res.data.cycle_type
          this.getOnceReplaceData()
        })
          .catch(function(error) {
            console.log(error)
          })
      },
      getOnceReplaceData() {
        axios.post('/fittings', this.remindOnceBody, {
          headers: {
            'Content-Type': 'application/x-www-form-urlencoded'
          }
        }).then((res) => {
          this.editRemind.data = res.data.data.items[0]
          if (this.editRemind.data.time_thresholds_two === 0) {
            this.editRemind.data.time_thresholds_two = ''
          }
          if (this.editRemind.data.time_thresholds_three === 0) {
            this.editRemind.data.time_thresholds_three = ''
          }
          if (this.editRemind.data.num_thresholds_two === 0) {
            this.editRemind.data.num_thresholds_two = ''
          }
          if (this.editRemind.data.num_thresholds_three === 0) {
            this.editRemind.data.num_thresholds_three = ''
          }
          if (this.editRemind.data.cycle_thresholds_two === 0) {
            this.editRemind.data.cycle_thresholds_two = ''
          }
          if (this.editRemind.data.cycle_thresholds_three === 0) {
            this.editRemind.data.cycle_thresholds_three = ''
          }
          // 所有提醒次数
          if (this.editRemind.data.time_thresholds_one_num === 1) {
            this.time_thresholds_one_num = '每天1次'
          } else {
            this.time_thresholds_one_num = '每天2次'
          }
          if (this.editRemind.data.time_thresholds_two_num === 1) {
            this.time_thresholds_two_num = '每天1次'
          } else if (this.editRemind.data.time_thresholds_two_num === 2) {
            this.time_thresholds_two_num = '每天2次'
          }
          if (this.editRemind.data.time_thresholds_three_num === 1) {
            this.time_thresholds_three_num = '每天1次'
          } else if (this.editRemind.data.time_thresholds_three_num === 2) {
            this.time_thresholds_three_num = '每天2次'
          }
          // 使用次数
          if (this.editRemind.data.num_thresholds_one_num === 1) {
            this.num_thresholds_one_num = '每天1次'
          } else {
            this.num_thresholds_one_num = '每天2次'
          }
          if (this.editRemind.data.num_thresholds_two_num === 1) {
            this.num_thresholds_two_num = '每天1次'
          } else if (this.editRemind.data.num_thresholds_two_num === 2) {
            this.num_thresholds_two_num = '每天2次'
          }
          if (this.editRemind.data.num_thresholds_three_num === 1) {
            this.num_thresholds_three_num = '每天1次'
          } else if (this.editRemind.data.num_thresholds_three_num === 2) {
            this.num_thresholds_three_num = '每天2次'
          }
          // 周期提醒
          if (this.editRemind.data.cycle_thresholds_one_num === 1) {
            this.cycle_thresholds_one_num = '每天1次'
          } else if (this.editRemind.data.cycle_thresholds_one_num === 2) {
            this.cycle_thresholds_one_num = '每天2次'
          }
          if (this.editRemind.data.cycle_thresholds_two_num === 1) {
            this.cycle_thresholds_two_num = '每天1次'
          } else if (this.editRemind.data.cycle_thresholds_two_num === 2) {
            this.cycle_thresholds_two_num = '每天2次'
          }
          if (this.editRemind.data.cycle_thresholds_three_num === 1) {
            this.cycle_thresholds_three_num = '每天1次'
          } else if (this.editRemind.data.cycle_thresholds_three_num === 2) {
            this.cycle_thresholds_three_num = '每天2次'
          }
        })
          .catch(function(error) {
            console.log(error)
          })
      },
      editReplaceWork() {
        // 使用年限
        if (this.time_thresholds_one_num === '每天1次') {
          this.editRemind.data.time_thresholds_one_num = 1
        } else {
          this.editRemind.data.time_thresholds_one_num = 2
        }
        if (this.time_thresholds_two_num === '每天1次') {
          this.editRemind.data.time_thresholds_two_num = 1
        } else if (this.time_thresholds_two_num === '每天2次') {
          this.editRemind.data.time_thresholds_two_num = 2
        }
        if (this.time_thresholds_three_num === '每天1次') {
          this.editRemind.data.time_thresholds_three_num = 1
        } else if (this.time_thresholds_three_num === '每天2次') {
          this.editRemind.data.time_thresholds_three_num = 2
        }
        // 使用次数
        if (this.num_thresholds_one_num === '每天1次') {
          this.editRemind.data.num_thresholds_one_num = 1
        } else {
          this.editRemind.data.num_thresholds_one_num = 2
        }
        if (this.num_thresholds_two_num === '每天1次') {
          this.editRemind.data.num_thresholds_two_num = 1
        } else if (this.num_thresholds_two_num === '每天2次') {
          this.editRemind.data.num_thresholds_two_num = 2
        }
        if (this.num_thresholds_three_num === '每天1次') {
          this.editRemind.data.num_thresholds_three_num = 1
        } else if (this.num_thresholds_three_num === '每天2次') {
          this.editRemind.data.num_thresholds_three_num = 2
        }
        // 周期提醒
        if (this.cycle_thresholds_one_num === '每天1次') {
          this.editRemind.data.cycle_thresholds_one_num = 1
        } else {
          this.editRemind.data.cycle_thresholds_one_num = 2
        }
        if (this.cycle_thresholds_two_num === '每天1次') {
          this.editRemind.data.cycle_thresholds_two_num = 1
        } else if (this.cycle_thresholds_two_num === '每天2次') {
          this.editRemind.data.cycle_thresholds_two_num = 2
        }
        if (this.cycle_thresholds_three_num === '每天1次') {
          this.editRemind.data.cycle_thresholds_three_num = 1
        } else if (this.cycle_thresholds_three_num === '每天2次') {
          this.editRemind.data.cycle_thresholds_three_num = 2
        }
        // 所有string转int ↓↓↓↓↓↓
        // 使用年限
        this.editRemind.data.time_service_life = parseInt(this.editRemind.data.time_service_life)
        this.editRemind.data.time_type = parseInt(this.editRemind.data.time_type)
        this.editRemind.data.time_thresholds_one = parseInt(this.editRemind.data.time_thresholds_one)
        this.editRemind.data.time_thresholds_one_num = parseInt(this.editRemind.data.time_thresholds_one_num)
        this.editRemind.data.time_thresholds_two = parseInt(this.editRemind.data.time_thresholds_two)
        this.editRemind.data.time_thresholds_two_num = parseInt(this.editRemind.data.time_thresholds_two_num)
        this.editRemind.data.time_thresholds_three = parseInt(this.editRemind.data.time_thresholds_three)
        this.editRemind.data.time_thresholds_three_num = parseInt(this.editRemind.data.time_thresholds_three_num)
        // 使用次数
        this.editRemind.data.num_service_life = parseInt(this.editRemind.data.num_service_life)
        this.editRemind.data.num_thresholds_one = parseInt(this.editRemind.data.num_thresholds_one)
        this.editRemind.data.num_thresholds_one_num = parseInt(this.editRemind.data.num_thresholds_one_num)
        this.editRemind.data.num_thresholds_two = parseInt(this.editRemind.data.num_thresholds_two)
        this.editRemind.data.num_thresholds_two_num = parseInt(this.editRemind.data.num_thresholds_two_num)
        this.editRemind.data.num_thresholds_three = parseInt(this.editRemind.data.num_thresholds_three)
        this.editRemind.data.num_thresholds_three_num = parseInt(this.editRemind.data.num_thresholds_three_num)
        // 使用周期
        this.editRemind.data.cycle_service_life = parseInt(this.editRemind.data.cycle_service_life)
        this.editRemind.data.cycle_type = parseInt(this.editRemind.data.cycle_type)
        this.editRemind.data.cycle_thresholds_one = parseInt(this.editRemind.data.cycle_thresholds_one)
        this.editRemind.data.cycle_thresholds_one_num = parseInt(this.editRemind.data.cycle_thresholds_one_num)
        this.editRemind.data.cycle_thresholds_two = parseInt(this.editRemind.data.cycle_thresholds_two)
        this.editRemind.data.cycle_thresholds_two_num = parseInt(this.editRemind.data.cycle_thresholds_two_num)
        this.editRemind.data.cycle_thresholds_three = parseInt(this.editRemind.data.cycle_thresholds_three)
        this.editRemind.data.cycle_thresholds_three_num = parseInt(this.editRemind.data.cycle_thresholds_three_num)
        axios.post('/fittings', this.editRemind, {
          headers: {
            'Content-Type': 'application/x-www-form-urlencoded'
          }
        }).then((res) => {
          this.$router.push({
            path: '/monitor/components/strateygs'
          })
        })
          .catch((error) => {
            this.$message.error(error.data.errmsg)
          })
      }
    }
  }
</script>

<style scoped>
  .addBody{
    width: 100%;
    min-height: 550px;
    margin-top: 20px;
    border: 1px solid #E0E0E0;
  }
  /deep/ .el-input__inner {
    height: 30px;
  }
  /deep/ .addMessage {
    padding: 10px 0px;
    width: 765px;
  }
  /deep/ .addMessageTwo {
    padding: 10px 0px;
    width: 930px;
  }
  /deep/ .top {
    border-bottom: 1px solid #E0E0E0;
  }
  /deep/ .time {
    border-bottom: 1px solid #E0E0E0;
  }
  .el-form-item {
    margin-bottom: 0px;
  }
  /deep/ .onlyLine {
    width: 100%;
  }
  /deep/ .el-radio {
    margin: 0px 5px;
  }
  /deep/ .bigMessage {
    width: 788px;
  }
  /deep/ .smallMessage {
    width: 256px;
  }
  /deep/ .theSmallMessage {
    width: 152px;
  }
  /deep/ .theSmallestMessage {
    width: 134px;
  }
  /deep/ .moreSmallMessage {
    width: 100px;
  }
  /deep/ .mostSmallMessage {
    width: 80px;
    margin-right: 5px;
  }
  /deep/ .clear{
    padding: 6px 16px;
    background-color: #333B3D;
    border-color: #333B3D ;
    color: #fff;
    float: right;
    margin-top: 20px;
    margin-left: 10px;
  }
  /deep/ .indieWidth {
    padding: 6px 16px;
    float: right;
    border:1px solid #25B6C7;
    background: #25B6C7;
    margin-top: 20px;
  }
  /deep/ .readonlyOne > .el-input__inner {
    border: none;
  }
</style>
